#define _CRT_SECURE_NO_WARNINGS

#include<stdio.h>

 void print(int i,int count)
{
	int ret = 0;
	int sum = 1;
	int SUM = 0;
	while (count)
	{
		ret = i % 10;
		while (count)
		{
			sum = sum * ret;
			count--;
		}
		SUM = SUM + sum;
		count--;
	}
	if (i == SUM)
	{
		printf("%d ", i);
	}
	
}

int main()
{
	int count = 1;
	int i = 0;
	i >= 0 && i <= 100000;
	
	while (i / 10)
	{
		count++;
	}
	print(i,count);
	

	return 0;
}